package com.ruoyi.lc.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.lc.mapper.LcDatamodelIndexMapper;
import com.ruoyi.lc.domain.LcDatamodelIndex;
import com.ruoyi.lc.service.ILcDatamodelIndexService;

/**
 * 索引维护Service业务层处理
 * 
 * @author qibotian
 * @date 2025-01-07
 */
@Service
public class LcDatamodelIndexServiceImpl implements ILcDatamodelIndexService 
{
    @Autowired
    private LcDatamodelIndexMapper lcDatamodelIndexMapper;

    /**
     * 查询索引维护
     * 
     * @param id 索引维护主键
     * @return 索引维护
     */
    @Override
    public LcDatamodelIndex selectLcDatamodelIndexById(Long id)
    {
        return lcDatamodelIndexMapper.selectLcDatamodelIndexById(id);
    }

    /**
     * 查询索引维护列表
     * 
     * @param lcDatamodelIndex 索引维护
     * @return 索引维护
     */
    @Override
    public List<LcDatamodelIndex> selectLcDatamodelIndexList(LcDatamodelIndex lcDatamodelIndex)
    {
        return lcDatamodelIndexMapper.selectLcDatamodelIndexList(lcDatamodelIndex);
    }

    /**
     * 新增索引维护
     * 
     * @param lcDatamodelIndex 索引维护
     * @return 结果
     */
    @Override
    public int insertLcDatamodelIndex(LcDatamodelIndex lcDatamodelIndex)
    {
        lcDatamodelIndex.setCreateTime(DateUtils.getNowDate());
        return lcDatamodelIndexMapper.insertLcDatamodelIndex(lcDatamodelIndex);
    }

    /**
     * 修改索引维护
     * 
     * @param lcDatamodelIndex 索引维护
     * @return 结果
     */
    @Override
    public int updateLcDatamodelIndex(LcDatamodelIndex lcDatamodelIndex)
    {
        lcDatamodelIndex.setUpdateTime(DateUtils.getNowDate());
        return lcDatamodelIndexMapper.updateLcDatamodelIndex(lcDatamodelIndex);
    }

    /**
     * 批量删除索引维护
     * 
     * @param ids 需要删除的索引维护主键
     * @return 结果
     */
    @Override
    public int deleteLcDatamodelIndexByIds(Long[] ids)
    {
        return lcDatamodelIndexMapper.deleteLcDatamodelIndexByIds(ids);
    }

    /**
     * 删除索引维护信息
     * 
     * @param id 索引维护主键
     * @return 结果
     */
    @Override
    public int deleteLcDatamodelIndexById(Long id)
    {
        return lcDatamodelIndexMapper.deleteLcDatamodelIndexById(id);
    }
}
